import 'package:flutter/material.dart';
import 'package:get/get.dart';

import 'logic.dart';

class MainPage extends StatelessWidget {
  const MainPage({super.key});
  @override
  Widget build(BuildContext context) {
    final logic = Get.find<MainLogic>();
    final state = Get.find<MainLogic>().state;

    return Scaffold(
        appBar: AppBar(
          title: const Text("vpn"),
        ),
        body: Center(
            child: Column(children: [
          ElevatedButton(
              onPressed: logic.startService, child: const Text("开启")),
          ElevatedButton(onPressed: logic.stopService, child: const Text("关闭")),
        ])));
  }
}
